{% extends "base.html" %}
{% load markup %}

{% block title %}Blog{% endblock %}

{% block head %}
  <link rel="alternate" type="application/atom+xml" href="{% url posts-feed %}" />
{% endblock %}

{% block primary-content %}
<span class="breadcrumbs"><a href="{% url index %}" title="Home">Home</a> &raquo; Blog</span>
<h2>The {{ location.site.name }} Blog</h2>
<p class="page-intro">Our blog pulls information, articles, events, and news relevant to how campaign money works in Philadelphia politics. We'll track the money behind both recent political developments and longstanding policy. The Our Philadelphia blog is open to comments by logged in users.</p>
{% for post in posts.object_list %}
<h3 class="blog-teaser"><a href="{% url blog_post post.id %}">{{ post }}</a></h3>
<div class="blog-main clearfix">
	<small class="date-posted">Posted {{ post.pub_date|date }} by {{ post.get_author }}</small>
	{{ post.body|markdown|truncatewords_html:110 }}    
	<!--<p class="read-more"><a href="{% url blog_post post.id %}">Continue Reading &raquo;</a></p>-->
</div>
<div class="blog-aside">
{% with post.issues.active as issues %}
{% with post.reps.active as reps %}
  {% include "news/snippets/aside.html" %}
{% endwith %}
{% endwith %}
</div>
{% endfor %}
{% if posts.has_next or posts.has_previous %}
<div class="pager clear-left">
  {% if posts.has_next %}
  <div class="float-left"><a href="?page={{ posts.next_page_number }}">&laquo; Older Entries</a></div>
  {% endif %}
  {% if posts.has_previous %}
  <div class="float-right"><a href="?page={{ posts.previous_page_number }}">Newer Entries &raquo;</a></div>
  {% endif %}
</div>
{% endif %}
{% endblock %}

{% block secondary-content %}
  {% include "snippets/signup_or_info.html" %}
  {% include "news/snippets/blog_archives.html" %}
  {% include "snippets/reports_and_news.html" %}
{% endblock %}

